import tensorflow as tf
from tensorflow import keras
import os

os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'


vggs = tf.keras.applications.VGG16(weights='imagenet', include_top=False, input_shape=(192, 192, 3))

for layer in vggs.layers:
    layer.trainable = False


feature_extract_model = keras.Sequential([
    vggs,
    keras.layers.Flatten(),
    keras.layers.Dense(64, activation=tf.nn.relu),
    keras.layers.Dropout(0.5),
    keras.layers.Dense(5, activation=tf.nn.softmax)
])

feature_extract_model.compile(
    optimizer=tf.optimizers.RMSprop(lr=2e-4),
    loss=tf.losses.CategoricalCrossentropy(),
    metrics=['accuracy']
)

feature_extract_model.summary()

